<template>
  <div>
    <p>user index page</p>
    <router-link to="/user/info">{{'跳转到info'}}</router-link>
    <router-link to="/user/love">{{'跳转到love'}}</router-link>
    <router-link to="/">{{'返回到index'}}</router-link>
  </div>
</template>
<script>
  export default {
    watch: {
      $route(to, from){
        alert(1)
        console.log(to)
        console.log(from)
      }
    },
    mounted(){
      console.log(this.$route.params.id)
      console.log(this.$router)
    }
  }
</script>